package com.shiku.imserver.common.ws;

import com.shiku.imserver.common.http.HttpRequest;
import com.shiku.imserver.common.http.HttpResponse;
import org.tio.core.ChannelContext;

public interface IWsMsgHandler {
    HttpResponse handshake(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) throws Exception;

    void onAfterHandshaked(HttpRequest httpRequest, HttpResponse httpResponse, ChannelContext channelContext) throws Exception;

    Object onBytes(WsRequest wsRequest, byte[] bArr, ChannelContext channelContext) throws Exception;

    Object onClose(WsRequest wsRequest, byte[] bArr, ChannelContext channelContext) throws Exception;

    Object onText(WsRequest wsRequest, String str, ChannelContext channelContext) throws Exception;
}
